/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.SupplierModuleMapper;
public class SupplierModule extends BaseAction
{
    @Autowired(required=false)
	private SupplierModuleMapper mapper;
    /**
    采购合同
    */
    
    public Map contractPurchase() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_price=mapper.s_price(params);
        result.put("s_price", s_price);
        
        return result;
    }
    /**
    合同详情
    */
    
    public Map contractDetailsSup() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> price=mapper.price(params);
        result.put("price", price);
        
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> pum=mapper.pum(params);
        result.put("pum", pum);
        
        
        SQLList<SQLMap> s_bank=mapper.s_bank(params);
        result.put("s_bank", s_bank);
        
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_breakduty=mapper.s_breakduty(params);
        result.put("s_breakduty", s_breakduty);
        
        
        SQLList<SQLMap> s_pay=mapper.s_pay(params);
        result.put("s_pay", s_pay);
        
        
        SQLList<SQLMap> s_duty=mapper.s_duty(params);
        result.put("s_duty", s_duty);
        
        
        SQLList<SQLMap> s_num=mapper.s_num(params);
        SQLMap s_num_emt=s_num.getExistfirst();
        result.put("s_num", s_num_emt);
        
        return result;
    }
    /**
    供应商联系人
    */
    
    public Map supplierContact() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        
        
        SQLList<SQLMap> person_info=mapper.person_info(params,pagination);
        person_info.setPagedListInfo(pagination);
        result.put("person_info", person_info);
        
        return result;
    }
    /**
    业绩评价
    */
    
    public Map supplierEvaluate() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_evaluate=mapper.s_evaluate(params);
        result.put("s_evaluate", s_evaluate);
        
        return result;
    }
    /**
    查看评价
    */
    
    public Map viewEvaluation() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_evaluate=mapper.t_evaluate(params);
        SQLMap t_evaluate_emt=t_evaluate.getExistfirst();
        result.put("t_evaluate", t_evaluate_emt);
        
        return result;
    }
    /**
    */
    
    public Map d_contract() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_contract(params);
        
        return result;
    }
    /**
    增加采购合同修改
    */
    
    public Map contractPurchaseAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        
        
        return result;
    }
    /**
    增加合同产品修改
    */
    
    public Map contractProductAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        
        for (SQLMap emt:hqlBean.getTableElements("product_info")){
            params=new SQLParam(request,emt.getMap());
            mapper.bi_product(params);
        }
        
        return result;
    }
    /**
    */
    
    public Map d_producenum() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_producenum(params);
        
        return result;
    }
    /**
    */
    
    public Map d_bank() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_bank(params);
        
        return result;
    }
    /**
    */
    
    public Map d_duty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_duty(params);
        
        return result;
    }
    /**
    */
    
    public Map d_pay() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_pay(params);
        
        return result;
    }
    /**
    */
    
    public Map d_breakduty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_breakduty(params);
        
        return result;
    }
    /**
    */
    
    public Map d_demand() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_demand(params);
        
        return result;
    }
    /**
    */
    
    public Map d_evaluate() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_evaluate(params);
        
        return result;
    }
    /**
    增加评价修改
    */
    
    public Map increaseEvaluationSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_evaluate = mapper.i_evaluate(params);
        result.put("i_evaluate", i_evaluate);
        
        return result;
    }
}